package com.cxy.service.Impl;

import com.cxy.dto.ListRateDTO;
import com.cxy.entity.ListRate;
import com.cxy.mapper.ListRateMapper;
import com.cxy.service.ListRateService;
import com.cxy.vo.ListRateVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ListRateServiceImpl implements ListRateService {
    @Autowired
    private ListRateMapper listRateMapper;
    /**
     * 返回榜单评级
     * @return
     */
    public List<ListRateVO> selectAll() {
       List<ListRateVO>listRateVOS = listRateMapper.selectAll();
        return listRateVOS;
    }

    /**
     * 根据id查询榜单评级
     * @param id
     * @return
     */
    public ListRate getById(Long id) {
       ListRate listRate = listRateMapper.getById(id);
        return listRate;
    }

    /**
     * 修改榜单评级
     */
    public void update(ListRateDTO listRateDTO) {
        listRateMapper.update(listRateDTO);
    }
}
